﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.Data.SqlClient;
/// <summary>
/// Descripción breve de ConnectionManager
/// </summary>
namespace dao
{
    public class ConnectionManager
    {
        public ConnectionManager()
        {
            //
            // TODO: Agregar aquí la lógica del constructor
            //
        }
        public static SqlConnection getSqlConnection()
        {
            return new SqlConnection(getConnectionString("SQLSERVER2005"));
        }
        public static String getConnectionString(String connectionName)
        {
            String connectionString = "";
            ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[connectionName];
            if (settings != null)
                connectionString = settings.ConnectionString;
            return connectionString;
        }
    }
}
